package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 优惠券:存储优惠券基础配置,商品优惠券除外对象 super_coupon
 * 
 * @author ruoyi
 * @date 2025-08-13
 */
public class SuperCoupon extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 优惠券ID,自增 */
    private Long id;

    /** 优惠券标题 */
    @Excel(name = "优惠券标题")
    private String title;

    /** 优惠券类型(如1满减,2折扣) */
    @Excel(name = "优惠券类型(如1满减,2折扣)")
    private Integer type;

    /** 优惠金额或折扣比例 */
    @Excel(name = "优惠金额或折扣比例")
    private BigDecimal amount;

    /** 使用条件(满多少可用) */
    @Excel(name = "使用条件(满多少可用)")
    private BigDecimal condition;

    /** 有效期开始 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期开始", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 有效期结束 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期结束", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 总发放量 */
    @Excel(name = "总发放量")
    private Integer totalCount;

    /** 已领数量 */
    @Excel(name = "已领数量")
    private Integer usedCount;

    /** 删除标志(0存在) */
    @Excel(name = "删除标志(0存在)")
    private Integer del;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }

    public void setType(Integer type) 
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }

    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }

    public void setCondition(BigDecimal condition) 
    {
        this.condition = condition;
    }

    public BigDecimal getCondition() 
    {
        return condition;
    }

    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }

    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }

    public void setTotalCount(Integer totalCount) 
    {
        this.totalCount = totalCount;
    }

    public Integer getTotalCount() 
    {
        return totalCount;
    }

    public void setUsedCount(Integer usedCount) 
    {
        this.usedCount = usedCount;
    }

    public Integer getUsedCount() 
    {
        return usedCount;
    }

    public void setDel(Integer del) 
    {
        this.del = del;
    }

    public Integer getDel() 
    {
        return del;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("type", getType())
            .append("amount", getAmount())
            .append("condition", getCondition())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("totalCount", getTotalCount())
            .append("usedCount", getUsedCount())
            .append("del", getDel())
            .toString();
    }
}
